package cn.kys.modules.system.repository;



import cn.kys.modules.system.domain.Contract;
import cn.kys.modules.system.domain.ContractFile;
import cn.kys.modules.system.domain.ContractLand;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


public interface ContractTDQLRepository {


    public Map judgeStatus(@Param("sqlStr") String sqlStr);

    public String findLandArea(@Param("sqlStr") String sqlStr);

    public String searchCount(@Param("sqlStr") String sqlStr);

    public void addContract(Contract contract);

    public void updateContract(Contract contract);

    public List<Map<String,Object>> findLandByUuid(@Param("uuid")String uuid);

    public List<Map<String,Object>> findQSDW(@Param("qsdw_code")String qsdw_code);

    public void addContractLand(ContractLand contractLand);
    /**
     * 分页查询用户
     * @return
     */
    List<Contract> selectContractByPage(String condition, String type, @Param("pageSize") int pageSize, @Param("offset") int offset);

    public String findAllContractCount();

    public List<Map<String,Object>> findLand(String condition, String type);

    public List<Map<String,Object>> findLandType(String condition, String type);

    public List<Map<String,Object>> findContractLand(String condition, String type);

    public List<Map<String,Object>> findContractLandText(String condition, String type);

    public List<Map<String,Object>> updateContractLand(@Param("pkId")String pkId, @Param("expired")boolean expired);

    public List<Map<String,Object>> findContractFile(String condition, String type);

    public List<Contract> findContract(String condition, String type);

    public List<Map<String,Object>> findLandByPos(String lat, String lon);

    public List<Map<String,Object>> findLandByPosAndCode(@Param("lat") String lat,@Param("lon") String lon,@Param("cut_num") int cut_num,@Param("qsdw_code") String qsdw_code);

    public List<Map<String,Object>> findContractLandByPosAndCode(@Param("lat") String lat,@Param("lon") String lon,@Param("cut_num") int cut_num,@Param("qsdw_code") String qsdw_code);



    public void deleteContract(String id, String type);

    public void deleteContractFile(String contractpkid, String type);

    public void deleteContractLand(String contractpkid, String type);


    public void addContractFile(ContractFile contractFile);

    public List findLandCenter();

    public String findFBLandCount(@Param("cut_num") int cut_num,@Param("qsdw_code") String qsdw_code,@Param("length") int length);

    public String findNOTFBLandCount(@Param("cut_num") int cut_num,@Param("qsdw_code") String qsdw_code,@Param("length") int length);

    public String findFBLandArea(@Param("cut_num") int cut_num,@Param("qsdw_code") String qsdw_code,@Param("length") int length);

    public String findNOTFBLandArea(@Param("cut_num") int cut_num,@Param("qsdw_code") String qsdw_code,@Param("length") int length);

    public List findContractFileById(@Param("id") String id);

    public void deleteContractFileSingle(@Param("id") String id);
}
